#include <memory>
#include "tcpServer.hpp"

//./tcpServer port
void Usage(std::string cmd)
{
    std::cout << "\n\tUsage:" << cmd << " [port]\n" << std::endl;
}

int main(int argc, char* argv[])
{
    if(argc != 2) {
        Usage(argv[0]);
        exit(0);
    }
    int port = atoi(argv[1]);

    std::unique_ptr<tcpServer> ts(new tcpServer(port));
    ts->init();
    ts->run();
    return 0;
}